import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [
  { path: '', redirectTo: '/dashboard', pathMatch: 'full' },
  { path: 'home', loadChildren: './home/home.module#HomePageModule' },
  { path: 'hero', loadChildren: './page/hero/hero.module#HeroPageModule' },
  { path: 'dashboard', loadChildren: './page/dashboard/dashboard.module#DashboardPageModule' },
  { path: 'hero-detail/:id', loadChildren: './page/hero-detail/hero-detail.module#HeroDetailPageModule' },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
